package com.bing.schoolmanager.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ReturnData {

    private int code;
    private String message;
    private Object data;


    public static ReturnData success(String message, Object data){
        return new ReturnData(1,message, data);
    }

    public static ReturnData error(String message){
        return new ReturnData(0,message,null);
    }
}
